1. Field of the Invention
The invention relates to a Universal Serial Bus (USB) host controller and control method thereof, and more particularly to a USB host controller and control method thereof complied with the USB 2.0 standard for supporting periodic transfer and asynchronous transfer between the USB host controller and USB devices.
2. Description of the Related Art
Universal Serial Bus (USB) is a data communication standard developed by Intel and Microsoft for external buses. The main advantage is that the USB can support hot plug and plug & play functions. When a device is inserted, the host can enumerates the device and loads required driver programs automatically. Thus, USB is more convenient than Peripheral Component Interconnect (PCI) bus and Industry Standard Architecture (ISA) bus. USB standard is applied widely in different external device. For example, the USB can be used to connect computer mouses, keyboards, gamepads, joysticks, scanners, digital cameras, printers, hard discs, and network elements.
The USB has two common specifications: USB 1.1 and USB 2.0. For USB 1.1, the high speed transfer is 12 Mbps, while the low speed transfer is 1.5 Mbps. USB 2.0 is derived from USB 1.1. Its transfer speed may reach up to 480 Mbps (60 MB/s) and thus can satisfy speed requirements of most external devices. The enhanced host controller interface (EHCI) of USB 2.0 defines a structure compatible with USB 1.1, therefore the driver programs of USB 2.0 can drive devices of USB 1.1. In other words, all USB 1.1 supportive devices can be directly applied in USB 2.0 interface without concerning the issue of compatibility. Moreover, auxiliary elements, such as USB lines and plugs, can also be applied directly.
USB system is designed asymmetrically. It is composed by a USB host controller and several hub devices connected in tree architecture. The USB host controller is an important element responsible for physical data transfers between the USB host and the USB device. Pipes of data transmission between the USB host controller and USB devices can be classified into 4 types: control transfer, isochronous transfer, interrupt transfer, and bulk transfer. The control transfer is usually utilized in short and simple responses to commands and/or status of devices, such as pipe 0 used for bus control. The pipe 0 is a requisite pipe of USB system and is used to control USB devices on the bus. The isochronous transfer provides continuous data transfer (possibly but may not be provided at high speeds), such as real-time audio and video data. But isochronous transfer may suffer the problem of data loss. Interrupt transfer is applied for USB devices that must be responded as soon as possible (only allowing for limited delay), such as computer mouses and keyboards. Bulk transfer utilizes unused bandwidth for transferring large data (without guarantee of delay, continuity, bandwidth, and/or speed), such as common file transfers. Based on the features of the four transfers, the isochronous transfer and the interrupt transfer are generally referred to periodic transfers, while the control transfer and the bulk transfer are generally referred to asynchronous transfers.
USB host controller is the core element of a USB host and comprises five hub stages at most. The USB host controller can connect up to 127 USB devices, including each hub stage. Since USB is widely applied, designing USB host controller with low cost and high efficiency is an important issue in USB system design.